package com.ruicar.afs.cloud.bizcommon.commission.feign;

import com.alibaba.fastjson.JSONObject;
import com.ruicar.afs.cloud.bizcommon.commission.dto.basecommission.*;
import com.ruicar.afs.cloud.bizcommon.commission.dto.reward.ConfirmExpressDto;
import feign.Response;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.Description;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import java.util.Map;

/**
 * @author yaorui.zhang
 * @version 1.0
 * @Description 佣金系统-基本服务费
 * @date create on 2020年6月8日 15:26:49
 * @since 1.0
 */
@FeignClient(name = "BasecommissionFeign", url = "${com.greatwall.systems.commission-system.url}")
public interface BasecommissionFeign {

    @Description("基本服务费-案件状态列表")
    @PostMapping(value = "/basecommission/getstatus", consumes = MediaType.APPLICATION_JSON_VALUE)
    public JSONObject getstatus();

    @Description("基本服务费-确认信息-上传确认函")
    @PostMapping(value = "/basecommission/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    public JSONObject upload(@RequestPart("file") MultipartFile file);

    @Description("基本服务费-下发信息列表")
    @PostMapping(value = "/basecommission/getlist")
    public JSONObject getlist(@RequestBody GetlistDto getlistDto, @RequestHeader Map<String, String> headers);

    @Description("基本服务费-确认函退回列表")
    @PostMapping(value = "/basecommission/attachbacklist")
    public JSONObject attachbacklist(@RequestBody AttachbacklistDto attachbacklistDto, @RequestHeader Map<String, String> headers);

    @Description("基本服务费详情-合同信息列表")
    @PostMapping(value = "/basecommission/getbasecontractlist")
    public JSONObject getbasecontractlist(@RequestBody GetbasecontractlistDto getbasecontractlistDto);

    @Description("基本服务费-经销商详情")
    @PostMapping(value = "/basecommission/getbasedealerinfo")
    public JSONObject getbasedealerinfo(@RequestBody DealerinfoDto getbasedealerinfoDto);

    @Description("经销商附件信息-激励金额详情")
    @PostMapping(value = "/basecommission/getbasedealerattachs")
    public JSONObject getbasedealerattachs(@RequestBody DealerinfoDto getbasedealerinfoDto);

    @Description("基本服务费-导出合同Excel")
    @GetMapping(value = "/basecommission/export")
    Response export(@RequestParam("id") String id);

    @Description("基本服务费-下载确认函")
    @PostMapping(value = "/basecommission/signletter")
    Response signletter(@RequestParam("id") String id);

    @Description("基本服务费-经销商确认回执")
    @PostMapping(value = "/basecommission/confirmreceipt")
    public JSONObject confirmreceipt(@RequestBody ConfirmreceiptDto confirmreceiptDto);

    @Description("基本服务费-获取邮寄信息列表")
    @PostMapping(value = "/basecommission/getexpresslist")
    public JSONObject getexpresslist(@RequestBody ExpresslistDto expresslistDto);

    @Description("基本服务费-经销商发票历史列表")
    @PostMapping(value = "/basecommission/receipthistory")
    public JSONObject receipthistory(@RequestBody DealerinfoDto dealerinfoDto);

    @Description("基本服务费-保存邮寄信息")
    @PostMapping(value = "/basecommission/confirmexpress")
    public JSONObject confirmexpress(@RequestBody ConfirmExpressDto dto);

    @Description("基本服务费-经销商确认已打款")
    @PostMapping(value = "/basecommission/confirmreceivemoney")
    public JSONObject confirmreceivemoney(@RequestBody ReceiptDto receiptDto);

    @Description("基本服务费-下载基本服务费经销商附件信息")
    @GetMapping(value = "/basecommission/downloadattachs")
    Response downloadattachs(@RequestParam("id") String id);


}
